import 'package:flutter/material.dart';
import 'package:flutter_easyrefresh/easy_refresh.dart';
import 'package:flutter_screenutil/flutter_screenutil.dart';

import 'order_item/order_item_all.dart';

//全部订单
class AllOrderPage extends StatelessWidget {
  GlobalKey<RefreshFooterState> _footerKey =
  new GlobalKey<RefreshFooterState>();
  GlobalKey<RefreshHeaderState> _headKey = new GlobalKey<RefreshHeaderState>();

  @override
  Widget build(BuildContext context) {
    return Container(
      height: ScreenUtil().setHeight(1264),
      child: Column(
        children: <Widget>[
          Expanded(
              flex: 1,
              child: EasyRefresh(
                refreshFooter: ClassicsFooter(
                  key: _footerKey,
                  bgColor: Colors.white,
                  textColor: Colors.pink,
                  moreInfoColor: Colors.pink,
                  showMore: true,
                  noMoreText: "",
                  moreInfo: "加载中……",
                  loadReadyText: "上拉加载……",
                ),
                refreshHeader: ClassicsHeader(
                  key: _headKey,
                  bgColor: Colors.white,
                  textColor: Colors.pink,
                  refreshedText: "刷新完成",
                  refreshText: "准备下拉刷新",
                  refreshReadyText: "第一次下拉刷新了……",
                  refreshingText: "正在刷新……",
                  isFloat: false,
                ),
                onRefresh: () {},
                loadMore: () {},
                child: ListView.builder(
                    itemCount: 2,
                    itemBuilder: (context, index) {
                      return OrderItemAll();
                    }),
              ))
        ],
      ),
    );
  }
}
